import $ from '../common';
Page({
  data: {
    titleHeight: $.gData().titleHeight,
    statuHeight: $.gData().statuHeight,
  },
  onLoad(e) {
    this.setData({
      zonecode: wx.getStorageSync('addresscode') || '',
    })
  },
  onShow() {
    $.get('/user/info',{},res=>{
      this.setData({
        userinfo:res.user
      })
    })
  },
  onReachBottom() {

  },
  goany(e){
    const{idx}=e.currentTarget.dataset
    if(idx==1)$.navigateTo('/address/childrenlist')
    if(idx==2)$.navigateTo('/campus/selectcourse?type=collect')
    if(idx==3)$.navigateTo('/course/noticeof')
    if(idx==4)$.navigateTo('/index/feedback')
    if(idx==5)$.navigateTo('/setting/index')
  },
  goorder(e){
    const {idx=''}=e.currentTarget.dataset
    $.navigateTo(`/index/order?idx=${idx}`)
  },
  goset(){
    $.navigateTo('/setting/setmyinfo')
  }
})